package effect;

import core.Tile;
import effect.Effect.EffectType;

public class BlessLand extends Effect{
	public BlessLand(){
		name="Bless Land";
		description="Increases the mana and gold income of a target land by 1.";
		imageName="cardIconBlessLand.png";
		effectTypes.add(EffectType.activatable);
		targetType=TargetType.tile;
		manaCost=10;
	}
	
	@Override
	public void activate(Tile tile){
		EffectUtil.getCard(this).getOwner().addMana(-10);
		Effect newEffect = EffectGenerator.generateEffect("BlessedLand");
		tile.getLandCard().addEffect(newEffect);
	}
	@Override
	public boolean canActivate(){
		if(EffectUtil.getCard(this).getOwner().getMana()>=10)
			return true;
		else
			return false;
	}
	@Override
	public boolean canActivate(Tile tile){
		for(Effect e : tile.getLandCard().getEffects()){
			if(e.getName().equals("Blessed Land")) //Might be changed to e.equals() once that function is implemented
				return false;
		}
		return true;		
	}
}
